p {
    margin: 0;
}

body {
    background-color: #f9f2e7;
}


/* 标题 */

h1 {
    text-align: center;
    font-size: 60px;
    color: #477998;
}

.container {
    position: relative;
    width: 471px;
    height: 471px;
    margin: 0 auto;
}

.game-board {
    width: 300px;
    height: 300px;
}

.row {
    width: 100%;
    height: 33.33%;
    display: flex;
    justify-content: space-between;
}

.cell {
    flex: 1;
    cursor: pointer;
    text-align: center;
    line-height: 99.99px;
    font-size: 88px;
}

.x .cell:not(.x):not(.o):hover::before {
    content: 'X';
    color: lightgray;
}

.game-board.o .cell:not(.x):not(.o):hover::before {
    content: 'O';
    color: lightgray;
}

.row:nth-child(-n+2) .cell {
    border-bottom: 4px solid #546363;
}

.cell.x::before {
    content: 'x';
    color: red;
}

.cell.o::before {
    content: 'o';
    color: blue;
}

.row .cell:nth-child(n+2) {
    border-left: 4px solid #546363;
}


/* 游戏获胜信息面板 */

.game-message {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(69, 133, 136, 0.4);
    text-align: center;
}


/* winner 获胜者 */

.game-message p {
    margin: 180px 0 40px 0;
    color: #fff;
    font-size: 50px;
}


/* 重新开始游戏按钮 */

.game-message button {
    color: #517304;
    border-color: #517304;
    width: 110px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
}


/* 游戏面板棋盘 */

.game-board {
    width: 471px;
    height: 471px;
}

.game-board.x .cell:not(.x):not(.o):hover::before {
    content: 'X';
    color: lightgray;
}

.game-board.o .cell:not(.x):not(.o):hover::before {
    content: 'O';
    color: lightgray;
}